# Group........: Holly Hunt, Jason Payne, Kenneth Davidson
# Course.......: CSE450 
# Project ID...: 6
# Due Date.....: Only ONE day late this time
# Notes........: -none-

APP     = proj06
CFLAGS  = -Wall -g
LDFLAGS = -Wall -g
LEX     = flex
YACC    = bison
CC      = g++
SRCS    = Loop.cpp Branch.cpp Index.cpp BinaryNode.cpp Id.cpp String.cpp Char.cpp Number.cpp StatementList.cpp Command.cpp Neg.cpp\
		  Add.cpp Sub.cpp Mul.cpp Div.cpp Mod.cpp\
		  Less.cpp LessEqual.cpp Greater.cpp GreaterEqual.cpp NotEqual.cpp DoubleEqual.cpp\
		  And.cpp Or.cpp\
		  Equ.cpp\
		  Function.cpp FunctionCall.cpp FunctionDefinition.cpp Return.cpp ArgNode.cpp ParamNode.cpp\
		  While.cpp If.cpp\
		  PrintVisitor.cpp IntPerdoVisitor.cpp PerdoVisitor.cpp SemanticVisitor.cpp IntToPerdoTranslator.cpp\
		  SymbolTable.cpp
OBJS    = ${SRCS:.cpp=.o}


.SUFFIXES: .cpp .o

.cpp.o:
	g++ ${CFLAGS} -c $<


all: depend $(APP)

$(APP): ${OBJS} parser.tab.o lexer.o
	$(CC) ${LDFLAGS} -o $@ ${OBJS} parser.tab.o lexer.o -lfl

parser.tab.cpp: $(APP).ypp
	$(YACC) -vb parser -d $(APP).ypp

parser.tab.o: parser.tab.cpp
	$(CC) $(CFLAGS) -c parser.tab.cpp

lexer.cpp: $(APP).lex parser.tab.cpp
	$(LEX) -o lexer.cpp $(APP).lex

lexer.o: lexer.cpp
	$(CC) $(CFLAGS) -c lexer.cpp


depend:
	makedepend ${SRCS}

clean:
	rm -f $(APP) *.o lexer.cpp parser.tab.cpp parser.tab.hpp *.pci

test:
	./$(APP) good/good.0.perdo out.pce && ./perdo out.pce
	./$(APP) good/good.1.perdo out.pce && ./perdo out.pce
	./$(APP) good/good.2.perdo out.pce && ./perdo out.pce
	./$(APP) good/good.3.perdo out.pce && ./perdo out.pce
	./$(APP) good/good.4.perdo out.pce && ./perdo out.pce
	./$(APP) good/good.5.perdo out.pce && ./perdo out.pce
	./$(APP) good/good.6.perdo out.pce && ./perdo out.pce
	./$(APP) good/good.7.perdo out.pce && ./perdo out.pce
	./$(APP) good/good.8.perdo out.pce && ./perdo out.pce
	./$(APP) good/good.9.perdo out.pce && ./perdo out.pce
	./$(APP) good/good.10.perdo out.pce && ./perdo out.pce

testhis:
	./compiler -ic good/good.0.perdo out.pci && ./perdo out.pci
	./compiler -ic good/good.1.perdo out.pci && ./perdo out.pci
	./compiler -ic good/good.2.perdo out.pci && ./perdo out.pci
	./compiler -ic good/good.3.perdo out.pci && ./perdo out.pci
	./compiler -ic good/good.4.perdo out.pci && ./perdo out.pci
	./compiler -ic good/good.5.perdo out.pci && ./perdo out.pci
	./compiler -ic good/good.6.perdo out.pci && ./perdo out.pci
	./compiler -ic good/good.7.perdo out.pci && ./perdo out.pci
	./compiler -ic good/good.8.perdo out.pci && ./perdo out.pci
	./compiler -ic good/good.9.perdo out.pci && ./perdo out.pci
	./compiler -ic good/good.10.perdo out.pci && ./perdo out.pci

# DO NOT DELETE

Loop.o: Loop.h Node.h Visitor.h StatementList.h
Branch.o: Branch.h Node.h Visitor.h StatementList.h
Index.o: Index.h Node.h Visitor.h
BinaryNode.o: BinaryNode.h Node.h Visitor.h
Id.o: Id.h Node.h Visitor.h
String.o: String.h Node.h Visitor.h
Char.o: Char.h Node.h Visitor.h
Number.o: Number.h Node.h Visitor.h /usr/include/stdlib.h
Number.o: /usr/include/features.h /usr/include/sys/cdefs.h
Number.o: /usr/include/gnu/stubs.h
Number.o: /usr/lib/gcc-lib/x86_64-linux/3.3.5/include/stddef.h
StatementList.o: StatementList.h Node.h Visitor.h
Command.o: Command.h Node.h Visitor.h ArgNode.h
Neg.o: Neg.h Node.h Visitor.h
Add.o: Add.h BinaryNode.h Node.h Visitor.h
Sub.o: Sub.h BinaryNode.h Node.h Visitor.h
Mul.o: Mul.h BinaryNode.h Node.h Visitor.h
Div.o: Div.h BinaryNode.h Node.h Visitor.h
Mod.o: Mod.h BinaryNode.h Node.h Visitor.h
Less.o: Less.h BinaryNode.h Node.h Visitor.h
LessEqual.o: LessEqual.h BinaryNode.h Node.h Visitor.h
Greater.o: Greater.h BinaryNode.h Node.h Visitor.h
GreaterEqual.o: GreaterEqual.h BinaryNode.h Node.h Visitor.h
NotEqual.o: NotEqual.h BinaryNode.h Node.h Visitor.h
DoubleEqual.o: DoubleEqual.h BinaryNode.h Node.h Visitor.h
And.o: And.h BinaryNode.h Node.h Visitor.h
Or.o: Or.h BinaryNode.h Node.h Visitor.h
Equ.o: Equ.h BinaryNode.h Node.h Visitor.h
Function.o: Function.h Node.h Visitor.h
FunctionCall.o: FunctionCall.h Function.h Node.h Visitor.h ArgNode.h
FunctionDefinition.o: FunctionDefinition.h Function.h Node.h Visitor.h
FunctionDefinition.o: ParamNode.h StatementList.h
Return.o: Return.h Node.h Visitor.h
ArgNode.o: ArgNode.h Node.h Visitor.h
ParamNode.o: ParamNode.h Node.h Visitor.h
While.o: While.h Loop.h Node.h Visitor.h StatementList.h
If.o: If.h Branch.h Node.h Visitor.h StatementList.h
PrintVisitor.o: PrintVisitor.h Visitor.h Char.h Node.h Command.h ArgNode.h
PrintVisitor.o: Id.h Index.h Number.h /usr/include/stdlib.h
PrintVisitor.o: /usr/include/features.h /usr/include/sys/cdefs.h
PrintVisitor.o: /usr/include/gnu/stubs.h
PrintVisitor.o: /usr/lib/gcc-lib/x86_64-linux/3.3.5/include/stddef.h
PrintVisitor.o: StatementList.h String.h Add.h BinaryNode.h Sub.h Mul.h Div.h
PrintVisitor.o: Mod.h Neg.h Equ.h DoubleEqual.h NotEqual.h Less.h LessEqual.h
PrintVisitor.o: Greater.h GreaterEqual.h And.h Or.h While.h Loop.h If.h
PrintVisitor.o: Branch.h
IntPerdoVisitor.o: IntPerdoVisitor.h Visitor.h SymbolTable.h
IntPerdoVisitor.o: /usr/lib/gcc-lib/x86_64-linux/3.3.5/include/stdarg.h
IntPerdoVisitor.o: Char.h Node.h Command.h ArgNode.h Id.h Index.h Number.h
IntPerdoVisitor.o: /usr/include/stdlib.h /usr/include/features.h
IntPerdoVisitor.o: /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h
IntPerdoVisitor.o: /usr/lib/gcc-lib/x86_64-linux/3.3.5/include/stddef.h
IntPerdoVisitor.o: StatementList.h String.h Add.h BinaryNode.h Sub.h Mul.h
IntPerdoVisitor.o: Div.h Mod.h Neg.h Equ.h DoubleEqual.h NotEqual.h Less.h
IntPerdoVisitor.o: LessEqual.h Greater.h GreaterEqual.h And.h Or.h While.h
IntPerdoVisitor.o: Loop.h If.h Branch.h FunctionCall.h Function.h
IntPerdoVisitor.o: FunctionDefinition.h ParamNode.h Return.h
PerdoVisitor.o: PerdoVisitor.h Visitor.h SymbolTable.h Char.h Node.h
PerdoVisitor.o: Command.h ArgNode.h Id.h Index.h Number.h
PerdoVisitor.o: /usr/include/stdlib.h /usr/include/features.h
PerdoVisitor.o: /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h
PerdoVisitor.o: /usr/lib/gcc-lib/x86_64-linux/3.3.5/include/stddef.h
PerdoVisitor.o: StatementList.h String.h Add.h BinaryNode.h Sub.h Mul.h Div.h
PerdoVisitor.o: Mod.h Neg.h Equ.h DoubleEqual.h NotEqual.h Less.h LessEqual.h
PerdoVisitor.o: Greater.h GreaterEqual.h And.h Or.h While.h Loop.h If.h
PerdoVisitor.o: Branch.h
SemanticVisitor.o: SemanticVisitor.h Visitor.h SymbolTable.h Char.h Node.h
SemanticVisitor.o: Command.h ArgNode.h Id.h Index.h Number.h
SemanticVisitor.o: /usr/include/stdlib.h /usr/include/features.h
SemanticVisitor.o: /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h
SemanticVisitor.o: /usr/lib/gcc-lib/x86_64-linux/3.3.5/include/stddef.h
SemanticVisitor.o: StatementList.h String.h Add.h BinaryNode.h Sub.h Mul.h
SemanticVisitor.o: Div.h Mod.h Neg.h Equ.h DoubleEqual.h NotEqual.h Less.h
SemanticVisitor.o: LessEqual.h Greater.h GreaterEqual.h And.h Or.h While.h
SemanticVisitor.o: Loop.h If.h Branch.h FunctionCall.h Function.h
SemanticVisitor.o: FunctionDefinition.h ParamNode.h Return.h
IntToPerdoTranslator.o: IntToPerdoTranslator.h SymbolTable.h
SymbolTable.o: SymbolTable.h
